package com.collabscm.md.base.web;


import org.apache.struts2.convention.annotation.Result;
import org.apache.struts2.convention.annotation.Results;

import com.collabscm.md.base.model.User;
import com.collabscm.md.base.service.OrganService;
import com.collabscm.md.base.service.UserService;
import com.collabscm.pf.web.BaseAction;

@Results(
//Struts的 Result配置，可以省略struts.xml的配置。
{
	@Result(name=UserAction.USER_LIST, location="/user/userList.jsp")//系统用户及人员列表页面
}
)
public class UserAction extends BaseAction {
	
	private static final long serialVersionUID = 1L;
	
	/**
	 * 返回用户列表页面
	 */
	private static final String USER_LIST = "userList";
	
	/**
	 * 返回用户查询列表请求页面
	 */
	private static final String QUERY_USER_REQ = "queryUserReq"; 
	
	/**
	 * 用户
	 */
	private User user;

	private UserService getUserService() {
		return getService(UserService.class);
	}
	
	/**
	 * 系统人员查询请求
	 * @return
	 * @throws Exception
	 */
	public String queryUserReq() throws Exception {
		return QUERY_USER_REQ;
	}

	/**
	 * 分页查询人员列表
	 */
	@SuppressWarnings("unchecked")
	public String queryUser() throws Exception {
		//page = getOrganService().getAllOrgan(organ, page);
		return USER_LIST;
	}
	
}
